import type { IJsonSchemaStatusBase } from "./editProps";
import type { Component } from "vue";
import type { IComsUnions } from "./store";

// ^ 定义 JSON Schema 的TS类型
export interface IJsonSchema {
  type: Component;
  id: string;
  name: IComsUnions;
  status: IJsonSchemaStatusBase;
}

// ^ 定义更新状态的函数类型
export interface IUpdateStatus {
  (
    statusKey: string,
    value?: string | number | boolean | { index: number; link: string },
  ): void;
}

// ^ 定义设置图片链接的函数类型
export interface ISetPicUrl {
  (index: number, link: string): void;
}
